<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index')->name('home.index');
    //区服基础数据
    $router->get('data/statdata', 'StatdataController@index')->name('statdata.index');
    //渠道基础数据
    $router->get('data/channelStat', 'ChannelStatController@index')->name('channelStat.index');
    //付费分析LTV
    $router->get('data/payForAnaly', 'PayAnalyController@index')->name('analy.index');
    //vip用户留存
    $router->get('data/vipAnaly', 'VipUserRateController@index')->name('vipUser.rate');
    //vip用户排行
    $router->get('data/vipUserRank', 'VipUserRankController@index')->name('vipUser.rank');
    //新手引导统计
    $router->get('data/guide', 'GuideController@index')->name('guide.index');
    //任务统计
    $router->get('data/task', 'TaskController@index')->name('task.index');

    //玩家角色
    $router->get('playerRole', 'PlayerController@role')->name('player.role');

    //角色详情
    $router->get('player/view', 'PlayerController@view')->name('player.view');

    //充值订单列表
    $router->get('orderList', 'OrderController@index')->name('order.index');

    //渠道列表api接口
    $router->get('order/channel', 'OrderController@channelList')->name('order.channel');

    //服务器管理
    $router->resource('server', 'ServerController');

    //合服
    $router->resource('mergeServer', 'MergeController', ['only' => ['index', 'create', 'store']]);

    //修改服务器状态
    $router->post('server/status', 'ServerController@status')->name('server.change');

    //根据服务器id修改服务器状态
    $router->post('server/serverIdStatus', 'ServerController@serverIdStatus')->name('server.serverIdStatus');

    //服务器状态
    $router->get('serverStatus', 'ServerController@ServerStatus')->name('server.status');

    //提交服务器状态查询
    $router->get('findServerStatus', 'ServerController@findStatus')->name('find.status');

    //修改端口
    $router->post('server/changePort', 'ServerController@changePort')->name('server.port');

    //开服计划
    $router->resource('openServerPlane', 'ServerPlanController');

    //游戏大区
    $router->resource('region', 'RegionController');

    //渠道管理
    $router->resource('channel', 'ChannelController');

    //订单充值排行
    $router->get('orderTop', 'OrderTopController@index')->name('orderTop.index');

    //充值档位
    $router->resource('chargeLevel', 'ChargeLevelController');

    //模拟充值
    $router->resource('orderReplete', 'OrderRepleteController', ['only' => ['index', 'create', 'store']]);

    $router->get('orderReplete/{order_sn}/replete', 'OrderRepleteController@replete')->name('order.replete');

    //白名单
    $router->resource('whiteList', 'WhiteListController');

    //踢人
    $router->post('playerRole/kicking', 'PlayerController@kicking')->name('player.kicking');

    //封角色
    $router->post('playerRole/forbid', 'PlayerController@forbid')->name('player.forbid');

    //角色禁言
    $router->post('playerRole/banned', 'PlayerController@banned')->name('player.banned');

    //用户列表
    $router->get('account', 'AccountController@index')->name('users.index');

    //封账号
    $router->post('account/banned', 'AccountController@banned')->name('account.banned');

    //角色禁言日志
    $router->resource('roleBannedLog', 'RoleBannedLogController');

    //角色禁封日志
    $router->resource('roleBanLog', 'RoleBanLogController');

    //账号禁封日志
    $router->resource('accountLog', 'AccountLogController');

    //邮件奖励
    $router->resource('mailReward', 'MailRewardController', ['only' => ['index', 'create', 'store']]);

    //道具管理
    $router->resource('itemManage', 'ItemManageController', ['only' => ['index', 'create']]);

    //加vip等级
    $router->resource('addVipLevel', 'AddVipLevelController', ['only' => ['index', 'create', 'store']]);

    //发布公告
    $router->resource('notice', 'NoticeController');

    //发布登录公告
    $router->resource('loginNotice', 'LoginNoticeController');

    //激活码
    $router->resource('giftCode', 'GiftCodeController', ['only' => ['index', 'create', 'store']]);

    //等级分布
    $router->get('levelDist', 'LevelController@dist')->name('level.dist');

    //玩家日志记录
    $router->get('playerRecord', 'PlayerController@record')->name('player.record');

    //游戏事件
    $router->resource('events', 'EventController');

    //单服每日数据统计
    $router->get('serverSingle', 'ServerSingleController@index')->name('serveringle.index');

    //批量导入开服计划
    $router->post('server/importServerPlan', 'ServerPlanController@import')->name('server.import');

    //用户留存列表
    $router->get('data/remain', 'RemainController@index')->name('remain.index');

    //等级流失统计
    $router->get('data/levelWash', 'LevelWashController@index')->name('levelWash.index');

    //充值时段走势统计
    $router->get('data/orders', 'StatOrderController@index')->name('dataOrder.index');

    //资源消耗统计
    $router->get('data/resource', 'ResourceController@index')->name('resource.index');

    //资源获取记录统计
    $router->get('data/getResource', 'ResourceController@getRecord')->name('resource.getRecord');

    //交易中心统计
    $router->get('data/tradingCenter', 'TradingController@index')->name('trading.index');

    //玩家聊天日志
    $router->get('player/chat', 'MessageController@index')->name('message.index');

    //激活码领取日志
    $router->get('player/giftCodeLog', 'GiftCodeLogController@index')->name('giftCodeLog.index');

    //激活码领取日志
    $router->get('player/chatRobot', 'ChatRobotController@index')->name('chatRobot.index');

    //活动配置
    $router->resource('gm/activity', 'ActivityController');

    //激活活动
    $router->post('gam/activity/activation', 'ActivityController@activation')->name('activity.action');

    //=================================================
    //
    //对分页select提供的数据接口
    //
    //=================================================

    //角色列表接口
    $router->get('api/player', 'ApiController@player')->name('api.player');

    //分页获取道具
    $router->get('api/getItem', 'ApiController@getItem')->name('api.getItem');
});
